<script type="text/javascript">
    $(document).ready( function() {
                 $('#submit2').click(function() {
            var form_data = {
                strkode_dealer : $('#strkode_dealer').val(),
                bulan : $('#bulan').val(),
                tahun : $('#tahun').val(),
                ajax : '1'
            };
            $.ajax({
                url: "<?php echo base_url(); ?>calon_manager/pra_cm",
                type: 'POST',
                async : false,
                data: form_data,
                success: function(msg) {
                    $('#message2').html(msg);
            }
            });
            return false;
            
        });
    });
</script>
<?php $this->load->helper('HTML');
echo link_tag('css/style2.css');
echo link_tag('images/favicon.ico','shortcut icon','image/x-icon');
?>
				<h2 class="title">DownLine</h2>
		        <table width="90%" border="0" cellpadding="1" cellspacing="1" id="data" align="center">
        <thead>
        <tr align="center" class="table" >
           <th >No</th>
           <th >Kode</th>
            <th >Nama</th>
            <th >Upline</th>
            
            <th >Unit</th>

        </tr>
    </thead>
    <tbody>

    <!-- ============isi ============ -->

		<?php
			$i=1;
			foreach($downline as $m) :

		?>

      	<tr class='data' align='center'>
			<td ><?php echo $i++; ?></td>
			<td align='left'>&nbsp;<?php echo $m->strkode_dealer; ?></td>
            <td align='left'>&nbsp;<?php echo $m->strnama_dealer; ?></td>
            <td align='left'>&nbsp;<?php echo $m->strnama_upline; ?></td>
           
            <td align='left'>&nbsp;<?php echo $m->strnama_unit; ?></td>

        </tr>
		<?php endforeach; ?>
    </tbody>
</table>
                <p>&nbsp;</p>
                <h2 class="title">PRA CALON MANAGER</h2>
                <form method="post" id="myForm">
                <table width="95%" border="0" cellpadding="0" cellspacing="0" id="data" align="left">
                 
                    <tr>
                        <td width="120">Pilih Penjualan Bulan:</td>
                        <td><?php echo $combo_bulan?>
                            <input type="text" name="tahun" id="tahun" size="5" readonly value="<?php echo date('Y')?>">
                            
                        </td>
                        <td>
                            <input type="hidden" name="strkode_dealer"  id="strkode_dealer" value="<?php echo $strkode?>">
        <?php echo '<br />'.form_submit('submit','Proses','id="submit2" class="button"')?></td>
                    </tr>
                </table>
</form>
                
                <p>&nbsp;</p>
<div id="message2"></div>
